Optimal. Leaf size=82 \[ \frac {5}{8} a^3 c x-\frac {5 a^3 c \cos ^3(e+f x)}{12 f}+\frac {5 a^3 c \cos (e+f x) \sin (e+f x)}{8 f}-\frac {c \cos ^3(e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {2815, 2757,
2748, 2715, 8} \begin {gather*} -\frac {5 a^3 c \cos ^3(e+f x)}{12 f}-\frac {c \cos ^3(e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{4 f}+\frac {5 a^3 c \sin (e+f x) \cos (e+f x)}{8 f}+\frac {5}{8} a^3 c x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2748
Rule 2757
Rule 2815
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x)) \, dx &=(a c) \int \cos ^2(e+f x) (a+a \sin (e+f x))^2 \, dx\\ &=-\frac {c \cos ^3(e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{4 f}+\frac {1}{4} \left (5 a^2 c\right ) \int \cos ^2(e+f x) (a+a \sin (e+f x)) \, dx\\ &=-\frac {5 a^3 c \cos ^3(e+f x)}{12 f}-\frac {c \cos ^3(e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{4 f}+\frac {1}{4} \left (5 a^3 c\right ) \int \cos ^2(e+f x) \, dx\\ &=-\frac {5 a^3 c \cos ^3(e+f x)}{12 f}+\frac {5 a^3 c \cos (e+f x) \sin (e+f x)}{8 f}-\frac {c \cos ^3(e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{4 f}+\frac {1}{8} \left (5 a^3 c\right ) \int 1 \, dx\\ &=\frac {5}{8} a^3 c x-\frac {5 a^3 c \cos ^3(e+f x)}{12 f}+\frac {5 a^3 c \cos (e+f x) \sin (e+f x)}{8 f}-\frac {c \cos ^3(e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{4 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.27, size = 54, normalized size = 0.66 \begin {gather*} \frac {a^3 c (60 f x-48 \cos (e+f x)-16 \cos (3 (e+f x))+24 \sin (2 (e+f x))-3 \sin (4 (e+f x)))}{96 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 89, normalized size = 1.09
method | result | size |
risch | \(\frac {5 a^{3} c x}{8}-\frac {a^{3} c \cos \left (f x +e \right )}{2 f}-\frac {a^{3} c \sin \left (4 f x +4 e \right )}{32 f}-\frac {a^{3} c \cos \left (3 f x +3 e \right )}{6 f}+\frac {a^{3} c \sin \left (2 f x +2 e \right )}{4 f}\) | \(78\) |
derivativedivides | \(\frac {-a^{3} c \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+\frac {2 a^{3} c \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-2 a^{3} c \cos \left (f x +e \right )+a^{3} c \left (f x +e \right )}{f}\) | \(89\) |
default | \(\frac {-a^{3} c \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+\frac {2 a^{3} c \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-2 a^{3} c \cos \left (f x +e \right )+a^{3} c \left (f x +e \right )}{f}\) | \(89\) |
norman | \(\frac {-\frac {4 a^{3} c}{3 f}+\frac {5 a^{3} c x}{8}-\frac {4 a^{3} c \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}-\frac {4 a^{3} c \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {4 a^{3} c \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {3 a^{3} c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {11 a^{3} c \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}-\frac {11 a^{3} c \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}-\frac {3 a^{3} c \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {5 a^{3} c x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {15 a^{3} c x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {5 a^{3} c x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {5 a^{3} c x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}\) | \(244\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 93, normalized size = 1.13 \begin {gather*} -\frac {64 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} c + 3 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c - 96 \, {\left (f x + e\right )} a^{3} c + 192 \, a^{3} c \cos \left (f x + e\right )}{96 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 67, normalized size = 0.82 \begin {gather*} -\frac {16 \, a^{3} c \cos \left (f x + e\right )^{3} - 15 \, a^{3} c f x + 3 \, {\left (2 \, a^{3} c \cos \left (f x + e\right )^{3} - 5 \, a^{3} c \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 196 vs.
\(2 (78) = 156\).
time = 0.21, size = 196, normalized size = 2.39 \begin {gather*} \begin {cases} - \frac {3 a^{3} c x \sin ^{4}{\left (e + f x \right )}}{8} - \frac {3 a^{3} c x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} - \frac {3 a^{3} c x \cos ^{4}{\left (e + f x \right )}}{8} + a^{3} c x + \frac {5 a^{3} c \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} + \frac {2 a^{3} c \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {3 a^{3} c \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} + \frac {4 a^{3} c \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {2 a^{3} c \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a \sin {\left (e \right )} + a\right )^{3} \left (- c \sin {\left (e \right )} + c\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 81, normalized size = 0.99 \begin {gather*} \frac {5}{8} \, a^{3} c x - \frac {a^{3} c \cos \left (3 \, f x + 3 \, e\right )}{6 \, f} - \frac {a^{3} c \cos \left (f x + e\right )}{2 \, f} - \frac {a^{3} c \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {a^{3} c \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.81, size = 250, normalized size = 3.05 \begin {gather*} \frac {5\,a^3\,c\,x}{8}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a^3\,c\,\left (15\,e+15\,f\,x\right )}{6}-\frac {a^3\,c\,\left (60\,e+60\,f\,x-32\right )}{24}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (\frac {a^3\,c\,\left (15\,e+15\,f\,x\right )}{6}-\frac {a^3\,c\,\left (60\,e+60\,f\,x-96\right )}{24}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {a^3\,c\,\left (15\,e+15\,f\,x\right )}{4}-\frac {a^3\,c\,\left (90\,e+90\,f\,x-96\right )}{24}\right )-\frac {3\,a^3\,c\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}-\frac {11\,a^3\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{4}+\frac {11\,a^3\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{4}+\frac {3\,a^3\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}+\frac {a^3\,c\,\left (15\,e+15\,f\,x\right )}{24}-\frac {a^3\,c\,\left (15\,e+15\,f\,x-32\right )}{24}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________